package com.taikang.util;

/**
 * Created by zhai on 16/5/16.
 */
public class TypeEnum {

    public enum TodoTypeEnum {
        CLEAN(1, "保洁"),
        REPAIR(2, "维修"),
        PHYSICAL(3, "理疗"),
        COOK(4, "私厨"),
        SHUTTLE(5, "接送");
        private Integer TodoID;
        private String TodoContent;

        public Integer getTodoID() {
            return TodoID;
        }

        public void setTodoID(Integer todoID) {
            TodoID = todoID;
        }

        public String getTodoContent() {
            return TodoContent;
        }

        public void setTodoContent(String todoContent) {
            TodoContent = todoContent;
        }

        TodoTypeEnum(Integer TodoId, String TodoContent) {
            this.TodoID = TodoId;
            this.TodoContent = TodoContent;
        }

        public static TodoTypeEnum getByValue(String value) {
            TodoTypeEnum[] todoTypeEna = TodoTypeEnum.values();
            for(TodoTypeEnum todoTypeEnum : todoTypeEna) {
                if(todoTypeEnum.getTodoContent().equals(value)) {
                    return todoTypeEnum;
                }
            }
            return null;
        }
    }

    public enum TaskStatusEnum {
        COMPLETE(1, "完成"),
        WAIT(2, "待排班"),
        ALREADY(3, "已排班"),
        PROCESS(4, "执行中"),
        TERMINATE(5, "终止"),
        AGAIN(6, "再排班"),
        DONE(7, "待评价");
        private Integer StatusID;
        private String StatusName;

        TaskStatusEnum(Integer StatusID, String StatusName) {
            this.StatusID = StatusID;
            this.StatusName = StatusName;
        }

        public Integer getStatusID() {
            return StatusID;
        }

        public void setStatusID(Integer statusID) {
            StatusID = statusID;
        }

        public String getStatusName() {
            return StatusName;
        }

        public void setStatusName(String statusName) {
            StatusName = statusName;
        }

        public static TaskStatusEnum getByValue(Integer value) {
            TaskStatusEnum[] statusEna = TaskStatusEnum.values();
            for(TaskStatusEnum statusEnum : statusEna) {
                if(statusEnum.getStatusID() == value) {
                    return statusEnum;
                }
            }
            return null;
        }
    }
}
